﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
//using BTGISWASECO.BusinessEntities;

/// <summary>
/// Summary description for OngTruyenDanEntities
/// </summary>
namespace BTGISWASECO.BusinessEntities
{
    public class OngTruyenDanEntities
    {
        #region khai bao thuoc tinh
        private int _objectID;
        private string _IDDoanOng;
        private string _IDDMZ;
        private string _IDDMA;
        private double _ChieuDai;
        private int _HuongDongChay;
        private string _HuongDongChayText;
        private double _DKTrong;
        private double _DKNgoai;
        private int _VatLieu;
        private string _VatLieuText;
        private string _CoOng;
        private string _CoOngText;
        private int _TieuChuanVL;
        private string _TieuChuanVLText;
        private int _NhaSanXuat;
        private string _NhaSanXuatText;
        private int _NuocSanXuat;
        private string _NuocSanXuatText;
        private int _NamLapDat;
        private int _NamSanXuat;
        private double _DoNhamDanhDinh;
        private double _DoNhamThucTe;
        private double _ALHoatDong;
        private double _ApLucThietKe;
        private string _MaTuyenDuong;//moi
        private string _DiemDau;
        private string _DiemCuoi;
        private double _DoSau;
        private double _DoDoc;
        private int _TinhTrang;
        private string _TinhTrangText;
        private int _SoLanSuCo;
        private int _DonViTK;
        private string _DonViTKText;
        private int _DonViTC;
        private string _DonViTCText;
        private int _DonViGS;
        private string _DonViGSText;
        private DateTime _NgayCNCuoi;
        private string _NguoiCNCuoi;
        private string _IDHinhAnh;
        private string _GhiChu;
        private int _LoaiNuoc;
        private string _LoaiNuocText;
        private string _LoaiVatLieu;

        public string LoaiVatLieu
        {
            get { return _LoaiVatLieu; }
            set { _LoaiVatLieu = value; }
        }


        public string MaTuyenDuong
        {
            get { return _MaTuyenDuong; }
            set { _MaTuyenDuong = value; }
        }

        public string DonViGSText
        {
            get { return _DonViGSText; }
            set { _DonViGSText = value; }
        }


        public int DonViGS
        {
            get { return _DonViGS; }
            set { _DonViGS = value; }
        }

        public string DonViTCText
        {
            get { return _DonViTCText; }
            set { _DonViTCText = value; }
        }

        public int DonViTC
        {
            get { return _DonViTC; }
            set { _DonViTC = value; }
        }

        public int NamSanXuat
        {
            get { return _NamSanXuat; }
            set { _NamSanXuat = value; }
        }

        public string DiemCuoi
        {
            get { return _DiemCuoi; }
            set { _DiemCuoi = value; }
        }

        public string DiemDau
        {
            get { return _DiemDau; }
            set { _DiemDau = value; }
        }

        public int SoLanSuCo
        {
            get { return _SoLanSuCo; }
            set { _SoLanSuCo = value; }
        }


        public string CoOngText
        {
            get { return _CoOngText; }
            set { _CoOngText = value; }
        }

        public string NhaSanXuatText
        {
            get { return _NhaSanXuatText; }
            set { _NhaSanXuatText = value; }
        }


        public string DonViTKText
        {
            get { return _DonViTKText; }
            set { _DonViTKText = value; }
        }

        public string LoaiNuocText
        {
            get { return _LoaiNuocText; }
            set { _LoaiNuocText = value; }
        }

        public string TinhTrangText
        {
            get { return _TinhTrangText; }
            set { _TinhTrangText = value; }
        }

        public string NuocSanXuatText
        {
            get { return _NuocSanXuatText; }
            set { _NuocSanXuatText = value; }
        }


        public string TieuChuanVLText
        {
            get { return _TieuChuanVLText; }
            set { _TieuChuanVLText = value; }
        }

        public string VatLieuText
        {
            get { return _VatLieuText; }
            set { _VatLieuText = value; }
        }


        public int HuongDongChay
        {
            get { return _HuongDongChay; }
            set { _HuongDongChay = value; }
        }

        public string HuongDongChayText
        {
            get { return _HuongDongChayText; }
            set { _HuongDongChayText = value; }
        }

        public int NhaSanXuat
        {
            get { return _NhaSanXuat; }
            set { _NhaSanXuat = value; }
        }


        public string GhiChu
        {
            get { return _GhiChu; }
            set { _GhiChu = value; }
        }


        public string IDHinhAnh
        {
            get { return _IDHinhAnh; }
            set { _IDHinhAnh = value; }
        }

        public string NguoiCNCuoi
        {
            get { return _NguoiCNCuoi; }
            set { _NguoiCNCuoi = value; }
        }


        public DateTime NgayCNCuoi
        {
            get { return _NgayCNCuoi; }
            set { _NgayCNCuoi = value; }
        }


        public int DonViTK
        {
            get { return _DonViTK; }
            set { _DonViTK = value; }
        }

        public int LoaiNuoc
        {
            get { return _LoaiNuoc; }
            set { _LoaiNuoc = value; }
        }


        public string CoOng
        {
            get { return _CoOng; }
            set { _CoOng = value; }
        }

        public double DKNgoai
        {
            get { return _DKNgoai; }
            set { _DKNgoai = value; }
        }

        public double DKTrong
        {
            get { return _DKTrong; }
            set { _DKTrong = value; }
        }


        public double ALHoatDong
        {
            get { return _ALHoatDong; }
            set { _ALHoatDong = value; }
        }

        public int TinhTrang
        {
            get { return _TinhTrang; }
            set { _TinhTrang = value; }
        }

        public double DoNhamDanhDinh
        {
            get { return _DoNhamDanhDinh; }
            set { _DoNhamDanhDinh = value; }
        }

        public double DoDoc
        {
            get { return _DoDoc; }
            set { _DoDoc = value; }
        }

        public double DoSau
        {
            get { return _DoSau; }
            set { _DoSau = value; }
        }


        public int NamLapDat
        {
            get { return _NamLapDat; }
            set { _NamLapDat = value; }
        }

        public double ApLucThietKe
        {
            get { return _ApLucThietKe; }
            set { _ApLucThietKe = value; }
        }


        public double DoNhamThucTe
        {
            get { return _DoNhamThucTe; }
            set { _DoNhamThucTe = value; }
        }

        public int NuocSanXuat
        {
            get { return _NuocSanXuat; }
            set { _NuocSanXuat = value; }
        }

        public int TieuChuanVL
        {
            get { return _TieuChuanVL; }
            set { _TieuChuanVL = value; }
        }

        public int VatLieu
        {
            get { return _VatLieu; }
            set { _VatLieu = value; }
        }

        public int OBJECTID
        {
            get { return _objectID; }
            set { _objectID = value; }
        }

        public string IDDoanOng
        {
            get { return _IDDoanOng; }
            set { _IDDoanOng = value; }
        }

        public string IDDMZ
        {
            get { return _IDDMZ; }
            set { _IDDMZ = value; }
        }

        public string IDDMA
        {
            get { return _IDDMA; }
            set { _IDDMA = value; }
        }

        public double ChieuDai
        {
            get { return _ChieuDai; }
            set { _ChieuDai = value; }
        }

        # endregion khai bao

        #region phuong thuc

        public OngTruyenDanEntities()
        {

        }

        public OngTruyenDanEntities(string IDDoanOng, string IDDMZ, string IDDMA, int HuongDongChay, double ChieuDai, double DKTrong, double DKNgoai, string CoOng,
                                   int VatLieu, int TieuChuanVL, int NhaSanXuat, int NuocSanXuat, int NamSanXuat, int NamLapDat, double DoNhamDanhDinh,
                                   double DoNhamThucTe, string MaTuyenDuong, double ALHoatDong, double ApLucThietKe, string DiemDau, string DiemCuoi, double DoSau, double DoDoc,
                                   int TinhTrang, int SoLanSuCo, int DonViTK, int DonViTC, int DonViGS, string NguoiCNCuoi, DateTime NgayCNCuoi, string GhiChu,
                                   string IDHinhAnh, //ninh thuan
                                    int LoaiNuoc, string LoaiVatLieu)
        {
            //Begin Ninh Thuan
            this._IDDoanOng = IDDoanOng;
            this._IDDMZ = IDDMZ;
            this._IDDMA = IDDMA;
            this._HuongDongChay = HuongDongChay;
            this._ChieuDai = ChieuDai;
            this._DKTrong = DKTrong;
            this._DKNgoai = DKNgoai;
            this._CoOng = CoOng;
            this._VatLieu = VatLieu;
            this._TieuChuanVL = TieuChuanVL;
            this._NhaSanXuat = NhaSanXuat;
            this._NuocSanXuat = NuocSanXuat;
            this._NamSanXuat = NamSanXuat;
            this._NamLapDat = NamLapDat;
            this._MaTuyenDuong = MaTuyenDuong;
            this._DoNhamDanhDinh = DoNhamDanhDinh;
            this._DoNhamThucTe = DoNhamThucTe;
            this._ALHoatDong = ALHoatDong;
            this._ApLucThietKe = ApLucThietKe;
            this._DiemDau = DiemDau;
            this._DiemCuoi = DiemCuoi;
            this._DoSau = DoSau;
            this._DoDoc = DoDoc;
            this._TinhTrang = TinhTrang;
            this._SoLanSuCo = SoLanSuCo;
            this._DonViTK = DonViTK;
            this._DonViTC = DonViTC;
            this._DonViGS = DonViGS;
            this._NguoiCNCuoi = NguoiCNCuoi;
            this._NgayCNCuoi = NgayCNCuoi;
            this._GhiChu = GhiChu;
            this.IDHinhAnh = IDHinhAnh;
            //End Ninh Thuan
            this._LoaiNuoc = LoaiNuoc;
            this._LoaiVatLieu = LoaiVatLieu;
        }
        public OngTruyenDanEntities(int OBJECTID, string IDDoanOng, string IDDMZ, string IDDMA, int HuongDongChay, double ChieuDai, double DKTrong, double DKNgoai, string CoOng,
                                   int VatLieu, int TieuChuanVL, int NhaSanXuat, int NuocSanXuat, int NamSanXuat, int NamLapDat, string MaTuyenDuong, double DoNhamDanhDinh,
                                   double DoNhamThucTe, double ALHoatDong, double ApLucThietKe, string DiemDau, string DiemCuoi, double DoSau, double DoDoc,
                                   int TinhTrang, int SoLanSuCo, int DonViTK, int DonViTC, int DonViGS, string NguoiCNCuoi, DateTime NgayCNCuoi, string GhiChu,
                                   string IDHinhAnh,
                                    int LoaiNuoc)
        {
            this._objectID = OBJECTID;
            //Begin Ninh Thuan
            this._IDDoanOng = IDDoanOng;
            this._IDDMZ = IDDMZ;
            this._IDDMA = IDDMA;
            this._HuongDongChay = HuongDongChay;
            this._ChieuDai = ChieuDai;
            this._DKTrong = DKTrong;
            this._DKNgoai = DKNgoai;
            this._CoOng = CoOng;
            this._VatLieu = VatLieu;
            this._TieuChuanVL = TieuChuanVL;
            this._NhaSanXuat = NhaSanXuat;
            this._NuocSanXuat = NuocSanXuat;
            this._NamSanXuat = NamSanXuat;
            this._NamLapDat = NamLapDat;
            this._MaTuyenDuong = MaTuyenDuong;
            this._DoNhamDanhDinh = DoNhamDanhDinh;
            this._DoNhamThucTe = DoNhamThucTe;
            this._ALHoatDong = ALHoatDong;
            this._ApLucThietKe = ApLucThietKe;
            this._DiemDau = DiemDau;
            this._DiemCuoi = DiemCuoi;
            this._DoSau = DoSau;
            this._DoDoc = DoDoc;
            this._TinhTrang = TinhTrang;
            this._SoLanSuCo = SoLanSuCo;
            this._DonViTK = DonViTK;
            this._DonViTC = DonViTC;
            this._DonViGS = DonViGS;
            this._NguoiCNCuoi = NguoiCNCuoi;
            this._NgayCNCuoi = NgayCNCuoi;
            this._GhiChu = GhiChu;
            this._IDHinhAnh = IDHinhAnh;
            //End Ninh Thuan
            this._LoaiNuoc = LoaiNuoc;
            this._LoaiVatLieu = LoaiVatLieu;
        }

        public OngTruyenDanEntities(DataRow row)
        {
            this._objectID = Convert.ToInt32(row["objectID"]);
            this._IDDoanOng = row["IDDoanOng"].ToString();
            this._IDDMA = row["IDDMA"].ToString();
            this._IDDMZ = row["IDDMZ"].ToString();
            this._HuongDongChayText = row["HuongDongChay"].ToString();
            if (row["ChieuDai"].ToString() != "Null")
                this._ChieuDai = Convert.ToDouble(row["ChieuDai"]);
            this._VatLieuText = row["VatLieu"].ToString();
            this._TieuChuanVLText = row["TieuChuanVL"].ToString();
            this._NuocSanXuatText = row["NuocSanXuat"].ToString();
            this._DiemDau = row["DiemDau"].ToString();
            this._DiemCuoi = row["DiemCuoi"].ToString();
            if (row["DoNhamThucTe"].ToString() != "Null")
                this._DoNhamThucTe = Convert.ToDouble(row["DoNhamThucTe"]);
            if (row["ApLucThietKe"].ToString() != "Null")
                this._ApLucThietKe = Convert.ToDouble(row["ApLucThietKe"]);
            if (row["NamLapDat"].ToString() != "Null")
                this._NamLapDat = Convert.ToInt32(row["NamLapDat"]);
            if (row["DoSau"].ToString() != "Null")
                this._DoSau = Convert.ToDouble(row["DoSau"]);
            if (row["DoDoc"].ToString() != "Null")
                this._DoDoc = Convert.ToDouble(row["DoDoc"]);
            this._MaTuyenDuong = row["MaTuyenDuong"].ToString();
            if (row["DoNhamDanhDinh"].ToString() != "Null")
                this._DoNhamDanhDinh = Convert.ToDouble(row["DoNhamDanhDinh"]);
            this._TinhTrangText = row["TinhTrang"].ToString();
            if (row["ALHoatDong"].ToString() != "Null")
                this._ALHoatDong = Convert.ToDouble(row["ALHoatDong"]);
            if (row["DKTrong"].ToString() != "Null")
                this._DKTrong = Convert.ToDouble(row["DKTrong"]);
            if (row["DKNgoai"].ToString() != "Null")
                this._DKNgoai = Convert.ToDouble(row["DKNgoai"]);
            if (row["CoOng"].ToString() != "Null")
                this._CoOngText = row["CoOng"].ToString();
            if (row["LoaiNuocDan"].ToString() != "Null")
                this._LoaiNuocText = row["LoaiNuocDan"].ToString();
            //if (row["DonViTK"].ToString() != "Null")
            this._DonViTKText = row["DonViTK"].ToString();
            if (row["NgayCNCuoi"].ToString() != "Null")
                this._NgayCNCuoi = Convert.ToDateTime(row["NgayCNCuoi"]);
            this._NguoiCNCuoi = row["NguoiCNCuoi"].ToString();
            this._IDHinhAnh = row["IDHinhAnh"].ToString();
            this._GhiChu = row["GhiChu"].ToString();
            this._NhaSanXuatText = row["NhaSanXuat"].ToString();
            this._LoaiVatLieu = row["LoaiVatLieu"].ToString();
        }


        //public OngTruyenDanEntities OngTruyenDanIDataReader(IDataReader dr)
        //{
        //    BTGISWASECO.BusinessEntities.OngTruyenDanEntities obj = new BTGISWASECO.BusinessEntities.OngTruyenDanEntities();
        //    obj._objectID = (dr["ObjectID"] is DBNull) ? -1 : Convert.ToInt32(dr["ObjectID"]);
        //    obj._IDDoanOng = (dr["IDDoanOng"] is DBNull) ? string.Empty : dr["_IDDoanOng"].ToString();
        //    obj._IDDMA = (dr["IDDMA"] is DBNull) ? string.Empty : dr["_IDDMA"].ToString();
        //    obj._HuongDongChay = (Convert.ToInt32(dr["HuongDongChay"]) >= 0) ? 0 : Convert.ToInt32(dr["HuongDongChay"]);
        //    obj._ChieuDai = (dr["ChieuDai"] is DBNull) ? 0 : Convert.ToInt32(dr["ChieuDai"]);
        //    return obj;
        //}

        #endregion phuong thuc
    }
}